package top.tangyh.lamp.care.common;

import top.tangyh.lamp.care.entity.BYcSunShangDict;
import top.tangyh.lamp.care.vo.result.SunShangOutVO;

import java.util.List;

public enum SunShangTypeEnum {
    /**
     * 受伤程度
     */
    BAD_SMELL_RADIO("BadSmellRadio") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setBadSmellRadio(dataList);
        }
    },
    ORIENTATION("orientation") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setOrientation(dataList);
        }
    },
    LEVEL("level") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setLevel(dataList);
        }
    },
    STEALTHS("stealths") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setStealths(dataList);
        }
    },
    SINUS("sinus") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setSinus(dataList);
        }
    },
    SECRETION("secretion") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setSecretion(dataList);
        }
    },
    BAD_SMELL("BadSmell") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setBadSmell(dataList);
        }
    },
    WOUND_BASE("WoundBase") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setWoundBase(dataList);
        }
    },
    STEALTH("stealth") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setStealth(dataList);
        }
    },
    NAME("name") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setName(dataList);
        }
    },
    PROGRESS("progress") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setProgress(dataList);
        }
    },
    PLACE("place") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setPlace(dataList);
        }
    },
    SECRETION_LIST("secretionList") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setSecretionList(dataList);
        }
    },
    OOZE("ooze") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setOoze(dataList);
        }
    },
    THE_WOUND_OF_THE_BASEMENT("TheWoundOfTheBasement") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setTheWoundOfTheBasement(dataList);
        }
    },
    YSZT7("YSZT7") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setYSZT7(dataList);
        }
    },
    GEN_PERIDERM_SKIN("GenPeridermSkin") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setGenPeridermSkin(dataList);
        }
    },
    DRESSING_STATE("DressingState") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setDressingState(dataList);
        }
    },
    DRESSING_APPLICATION("DressingApplication") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setDressingApplication(dataList);
        }
    },
    MEASURES("measures") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setMeasures(dataList);
        }
    },
    WOUND_BASE_PER("WoundBasePer") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
            sunShangOutVO.setWoundBasePer(dataList);
        }
    },
    OTHER("other") {
        @Override
        public void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList) {
        }
    };

    private String type;


    /**
     * 把对应数据放入list中
     *
     * @param sunShangOutVO
     * @param dataList
     */
    public abstract void putList(SunShangOutVO sunShangOutVO, List<BYcSunShangDict> dataList);


    /**
     * 通过type查找枚举
     *
     * @param type
     * @return
     */
    public static SunShangTypeEnum forValue(String type) {
        for (SunShangTypeEnum value : values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return OTHER;
    }

    SunShangTypeEnum(String type) {
        this.type = type;
    }

    SunShangTypeEnum() {
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}
